package org.sample.intro;
public class Sample {

	private String firstMember;
	private String secondMember;
	private String thirdMember;
	private boolean boolVal = false;
	private Object theObject;
	
	public Sample() {
		
	}
	
	public Sample(String value) {
		this.firstMember = value;
	}
	
	public Sample(String value1, String value2, String value3) {
		this.firstMember = value1;
		this.secondMember = value2;
		this.thirdMember = value3;
	}
	
	
    public String concatenate(String one, String two){
        return one + two;
    }
    
    public String[] getTheStringArray() {
    	String[] strArray = {firstMember, secondMember, thirdMember};
    	return strArray;
    }
    
    public boolean getTheSwitchedBoolean () {
    	return (boolVal = !boolVal);
    }
    
    
    public Object getTheObject() {
    	 return theObject;
    }
    
    public Object getTheSameObject() {
   	 	return theObject;
   }
    
    public Object getTheNewObject() {
    	return new Object();
    }
    
    public void initTheObject() {
    	theObject = new Object();
    }
    
    
    public String getFirstMember() {
    	return firstMember;
    }

	public String getSecondMember() {
		return secondMember;
	}

	public String getThirdMember() {
		return thirdMember;
	}
    
    public void checkForString (Object firstMember) {
    	if (!(firstMember instanceof String )) {
    		throw new IllegalArgumentException();
    	}
    }

	@Override
	public String toString() {
		
		return "This is a Sample. First member is : " + firstMember;
	}
    
    
}
